package com.swz.dcrm.ui;


import android.os.Bundle;

import androidx.fragment.app.Fragment;

import android.view.View;
import android.widget.TextView;

import com.swz.dcrm.ui.base.BaseFragment;
import com.swz.dcrm.R;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.navigation.fragment.NavHostFragment;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * A simple {@link Fragment} subclass.
 */
public class SuccessFragment extends BaseFragment {

    @BindView(R.id.tv)
    TextView tv;


    public static SuccessFragment newInstance() {

        return new SuccessFragment();
        // Required empty public constructor
    }

    @Override
    public void onLoadRetry() {

    }

    @Override
    public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        onLoadRetry();
    }

    @Override
    public int layoutId() {
        return R.layout.fragment_success;
    }

    @Override
    public boolean initView() {
        getDigger().inject(this);
        SuccessFragmentArgs successFragmentArgs=SuccessFragmentArgs.fromBundle(getArguments());
        tv.setText(successFragmentArgs.getContent());
        return false;
    }

    @OnClick(R.id.back)
    public void back(){
       // NavHostFragment.findNavController(this).navigateUp();

        NavHostFragment.findNavController(this).popBackStack(R.id.buyCarCalFragment ,true);
    }


}
